<style>
    body{
        background-color: #f9f9f9;
    }
</style>
<ul class="nav nav-tabs" role="tablist">
    <li role="presentation" class="active">
        <a href="#commit" aria-controls="commit" role="tab" data-toggle="tab">操作记录</a>
    </li>
    <li role="presentation">
        <a href="#state" aria-controls="state" role="tab" data-toggle="tab">状态记录</a>
    </li>
</ul>

<div class="tab-content">
    <div role="tabpanel" class="tab-pane active" id="commit">
        {% if commitLog is not empty %}
            <table class="table table-hover">
                <tr class="info">
                    <th style="min-width: 100px;">操作</th>
                    <th>操作内容</th>
                    <th>说明</th>
                    <th style="min-width: 80px;">操作人</th>
                    <th style="min-width: 90px;">操作时间</th>
                </tr>
                {% for log in commitLog %}
                    {% if log['operate'] is defined %}
                        <tr {% if log['level'] is not empty %} class="{{ log['level'] }}"{% endif %}>
                            <td>{{ log['operate'] }}</td>
                            <td>{{ log['msg'] }}</td>
                            <td>{% if log['explain'] is defined %} {{ log['explain'] }} {% endif %}</td>
                            <td>{{ log['userName'] }}</td>
                            <td>{{ log['changeTime'] }}</td>
                        </tr>
                    {% endif %}
                {% endfor %}
            </table>
        {% else %}
            <div class="alert alert-notice">
                <p>暂无修改记录</p>
            </div>
        {% endif %}

        {% if allowMark is defined%}
            <div class="form-inline">
                <label for="remark">备注：</label>
                <input type="text" id="remark" class="form-control" />
            </div>
        {% endif %}
    </div>
    <div role="tabpanel" class="tab-pane" id="state">
        {% if stateLog is not empty %}
            <table class="table table-hover">
                <tr class="info">
                    <th width="110">状态</th>
                    <th width="100">计划完成</th>
                    <th>说明</th>
                    <th style="min-width: 80px;">操作人</th>
                    <th style="min-width: 90px;">操作时间</th>
                </tr>
                {% for log in stateLog %}
                    <tr>
                        <td>{{ log['iState'] }}</td>
                        <td>{{ log['tPlanDate'] }}</td>
                        <td>{{ log['sExplain'] }}</td>
                        <td>{{ log['iCreateUserId'] }}</td>
                        <td>{{ log['tCreateDate'] }}</td>
                    </tr>
                {% endfor %}
            </table>
        {% else %}
            <div class="alert alert-notice">
                <p>暂无修改记录</p>
            </div>
        {% endif %}
    </div>
</div>